home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / origami / oribin.zoo / learn / main < prev    next >
Encoding:
Text File  |  1991-06-28  |  9.0 KB  |  254 lines

  1. You are looking at the Origami generic Emacs-mode tutorial.
  2.  
  3. This tutorial attempts to help you "learn by doing".  The characters ">>" at
  4. the left margin of your screen indicate directions for you to try using a
  5. command.
  6.  
  7. Origami commands generally involve the CONTROL key (sometimes labelled CTRL
  8. or CTL) or the META key (generally labelled ESCAPE).  Rather than write out
  9. CONTROL or META each time we want you to prefix a character, we'll use the
  10. following abbreviations:
  11.  
  12.     C-<chr>   Hold the CONTROL key while pressing the character <chr>.
  13.               Thus, C-F would be:  hold the CONTROL key and press F.
  14.  
  15.     M-<chr>   Press the ESCAPE key and release it, then press the
  16.               character <chr>.  Note:  All command treated in this tutorial
  17.               will have the same meaning for upper or lower case characters
  18.               (<chr>).  They will be written in lower case characters.
  19.  
  20. >>  Now type C-V (View Next Screen) to move to the next screen.
  21.     Remember:  hold the CONTROL key and press V once.
  22.  
  23. There is also a META-CONTROL combination:
  24.  
  25.     M-C-<chr> Press the ESCAPE key and release it, then hold the CONTROL key
  26.               while pressing the character <chr>.
  27.  
  28.  
  29. IMPORTANT NOTE:  If you must exit at some point, type C-X C-C.
  30.  
  31. For the time being, you'll be expected to type C-V whenever you finish reading
  32. the current screen.
  33.  
  34. Note that there is an overlap when going from screen to screen; this provides
  35. some continuity when moving through the file.
  36.  
  37. The first thing that you need to know is how to move around from place to
  38. place in the file.  You already know how to move forward a screen with C-V.
  39. To move back a screen, type M-v.
  40.  
  41. >>  Try typing M-v and then C-V to move back and forth between screens a few
  42.     times.
  43.  
  44.  
  45. SUMMARY
  46. -------
  47.  
  48. The following commands are useful for viewing screens:
  49.  
  50.      C-V      Move forward one screen
  51.      M-v      Move back one screen
  52.      C-L      Clear screen and redisplay everything, putting the text
  53.               near the cursor at the center of the screen.
  54.  
  55. >>  Find the cursor and remember what text is near it.  Type an C-L.
  56.     Find the cursor again and see what text is near it now.
  57.  
  58.  
  59. BASIC CURSOR CONTROL
  60. --------------------
  61.  
  62. Getting from screen to screen is useful, but how do you reposition yourself
  63. within a given screen to a specific place?  There are several ways you can
  64. do this.  One way (not the best, but the most basic) is to use the commands
  65. previous, backward, forward and next.  As you can imagine these commands
  66. (which are given to Origami as C-P, C-B, C-F, and C-N respectively) move the
  67. cursor from where it currently is to a new place in the given direction.
  68. Here, in a more graphical form, are the commands:
  69.  
  70.                           Previous line, C-P
  71.                                   :
  72.                                   :
  73.    Backward, C-B .... Current cursor position .... Forward, C-F
  74.                                   :
  75.                                   :
  76.                           Next line, C-N
  77.  
  78. You'll probably find it easy to think of these by letter.  P for previous,
  79. N for next, B for backward and F for forward.  These are the basic cursor
  80. positioning commands and you'll be using them ALL the time so it would be
  81. of great benefit if you learn them now.
  82.  
  83. >>  Do a few C-N's to bring the cursor down to this line.
  84.  
  85. >>  Move into the line with C-F's and then up with several C-P's.  Note what
  86.     C-P does when the cursor is in the middle of the line.
  87.  
  88. >>  Try C-B at the beginning of a line.  Note what happened to the cursor.
  89.     Do a few more C-B's.  Then do C-F's back to the end of the line and beyond.
  90.  
  91. When you go off the top or bottom of the screen, the text beyond the edge is
  92. shifted onto the screen so that your instructions can be carried out while
  93. keeping the cursor on the screen.
  94.  
  95. >>  Move the cursor off the bottom of the screen with C-N's and see what
  96.     happens.  Note the new position of the cursor.
  97.  
  98. If moving by characters is too slow, you can move by words.  M-f moves
  99. forward a word and M-b moves back a word.
  100.  
  101. >>  Type a few M-f's and M-b's.  Intersperse them with C-F's and C-B's.
  102.  
  103. Notice the parallel between C-F and C-B on the one hand, and M-F and M-B on
  104. the other hand.  Very often META characters are used for operations related
  105. to English text whereas CONTROL characters operate on the basic textual units
  106. that are independent of what you are editing (characters, lines, etc.).
  107.  
  108. Two other commands which are useful are C-A and C-E.  These commands move the
  109. cursor to the beginning (C-A) and the end (C-E) of the line.
  110.  
  111. >>  Try a couple of C-A's, and then a couple of C-E's.  Note that the cursor
  112.     does not move when either of these commands is repeated continuously.
  113.  
  114. Two other simple cursor motion commands are M-< (less than), which moves to
  115. the beginning of the entered fold, and M-> (greater than), which moves to
  116. the end of the entered fold.  If you need the shift key to type a "<", then
  117. you must also use the shift key to type M-<.  Otherwise, you would be typing
  118. M-, (depending on your keyboard).
  119.  
  120. The location of the cursor within the text is also called "point".  To
  121. paraphrase, the cursor shows on the screen where point is located in the
  122. text.
  123.  
  124. Here is a summary of simple moving operations, including the word and
  125. line moving commands:
  126.  
  127.      C-F       Move forward a character
  128.      C-B       Move back a character
  129.  
  130.      M-f       Move forward a word
  131.      M-b       Move back a word
  132.  
  133.      C-N       Move to next line
  134.      C-P       Move to previous line
  135.  
  136.      C-A       Move to beginning of line
  137.      C-E       Move to end of line
  138.  
  139.      M-<       Go to beginning of file
  140.      M->       Go to end of file
  141.  
  142. >>  Try all of these commands now a few times for practice as these are
  143.     the most often used commands.  Since the last two will take you away
  144.     from this screen, use C-V's and M-v's to return here.
  145.  
  146. Like all other commands in Origami, these commands can be given arguments
  147. which cause them to be executed repeatedly.  The way you give a command
  148. a repeat count is by pressing META (ESC) and then the number before you
  149. enter the command.
  150.  
  151. For instance, M-8 C-F moves forward eight characters.
  152.  
  153. >>  Try giving a suitable argument to C-N or C-P to come as close as you
  154.     can to this line in one jump.
  155.  
  156. This also applies to the screen moving commands, C-V and M-v.  When given
  157. an argument, they scroll the screen up or down by that many screens.
  158.  
  159. >>  Try typing ESC-3 C-V now.
  160.  
  161. If you would like to scroll up, you can give an argument to M-V.
  162.  
  163.  
  164. FOLDS
  165. -----
  166.  
  167. Origami is a folding editor.  Now is the time when you will get familiar with
  168. folds.  If a fold is closed, the first text in the fold header are three dots,
  169. followed by two blanks.  A fold can be opened with C-O.  The beginning of the
  170. fold header changes from the three dots to three opening curly braces. The end
  171. of the fold is marked by three closing curly braces.  You can close a open fold
  172. with C-C.
  173.  
  174. >>  Go two lines below and type C-O
  175.  
  176. {{{  This is the fold header
  177. These are the contents of this fold.
  178.  
  179. >>  Type C-C to close it.
  180. }}}
  181.  
  182. Another way to edit the contents of a fold is to enter it.  Entering is done
  183. by M-C-O.  Such a fold can be exited with M-C-O.
  184.  
  185. >>  Move the cursor to the fold below and type M-C-O
  186.  
  187. {{{  Another fold
  188. >>  Type M-C-C to exit this fold.
  189. }}}
  190.  
  191. Folds are created with M-C-N.
  192.  
  193. >>  Move the cursor at the beginning of this line and type M-C-N once to mark
  194.     the beginning of the fold at this line.  Move the cursor below this line
  195.     to mark the end and type M-C-N again.  The new fold will be closed.
  196.  
  197. >>  Write somthing at the fold header.  Remember, that you can write two
  198.     characters right from the three dots.
  199.  
  200. >>  To unfold this fold, type C-U while the cursor is on the closed fold.
  201.  
  202. The folds above contain text in this file.  Another kind of folds contains
  203. text of other files.  These folds are called file-folds.  You can not open
  204. file-folds, only entering them is possible.
  205.  
  206. >>  The next chapters are file-folds.  They begin with ...F and the name of
  207.     the chapter.  Enter then with M-C-O and exit them with M-C-C.
  208.     Move the cursor two lines down and enter the file-fold of the
  209.     abort chapter.
  210.  
  211. {{{F abort
  212. :::F abort
  213. }}}
  214.  
  215. {{{F errors
  216. :::F errors
  217. }}}
  218.  
  219. {{{F keys
  220. :::F keys
  221. }}}
  222.  
  223. {{{F modes
  224. :::F modes
  225. }}}
  226.  
  227. {{{F editing
  228. :::F editing
  229. }}}
  230.  
  231. {{{F search
  232. :::F search
  233. }}}
  234.  
  235. {{{F files
  236. :::F files
  237. }}}
  238.  
  239.  
  240. CONCLUSION
  241. ----------
  242.  
  243. Remember:  To EXIT use C-X C-C.
  244.  
  245. This tutorial is meant to be understandable to all new users, so if you
  246. found something unclear, don't sit and blame yourself - complain!
  247. Note that it does not explain every capability of Origami, only those you
  248. need to know for usual work.  I still suggest reading the manual.
  249.  
  250. You'll probably find that if you use Origami for a few days you won't be
  251. able to give it up.  Initially it may give you trouble.  But remember,
  252. this is the case with any editor, especially one that can do many, many
  253. things - and Origami can do practically everything.
  254.